package ExamSystemClient.src.com.lagou.model;

import java.util.Objects;

public class User implements java.io.Serializable {

    private static final long serialVersionUID = 9113357486959309994L;
    private String name;
    private String password;

    public User() {

    }

    public User(String name) {
        this.name = name;
    }

    public User(String name, String password) {

        this.name = name;
        this.password = password;
    }

    public String getName() {

        return name;
    }

    public void setName(String name) {

        this.name = name;
    }

    public String getPassword() {

        return password;
    }

    public void setPassword(String password) {

        this.password = password;
    }

    @Override
    public String toString() {

        return "User{" + "name='" + name + '\'' + ", password='" + password + '\'' + '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return name.equals(user.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }
}
